/**
 * 
 */
package br.srv.full.virtual.entities.ids;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.MappedSuperclass;

import sun.net.TelnetOutputStream;

/**
 * @author Delfino
 * 
 */
@MappedSuperclass
public class BaseId implements Serializable {

	@Column(length = 6)
	private String type;

	@Column(length = 20)
	private String number;

	public BaseId(){
		
	}
	/**
	 * @param type
	 *            the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @return the number
	 */
	public String getNumber() {
		return number;
	}

	/**
	 * @param p_number
	 *            the number to set
	 */
	public void setNumber(String p_number) {
		number = p_number;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return getType() + ": " + getNumber();
	}

}
